import { defineStore } from 'pinia';
import { ref } from 'vue';

const useLanguageStore = defineStore(
  'language',
  () => {
    const language = ref<string>('zh');

    const setLanguage = (languageVal: string) => {
      language.value = languageVal;
    };

    return {
      language,
      setLanguage
    };
  },
  {
    persist: true
  }
);

export default useLanguageStore;
